package org.canto.poss.instr.core.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Description: 基础扫描配置
 *
 * @author jsryin
 * @date 2024/08/04 17:44
 */
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
    private static final Logger LOGGER = LoggerFactory.getLogger(DateUtils.class);

    public static final String DAY1 = "yyyy-MM-dd";
    public static final String TIME1 = "yyyy-MM-dd HH:mm:ss";

    /**
     * 时间戳转具体日期时间
     *
     * @param time   时间戳
     * @param format 转换格式
     * @return
     */
    public static String formatTimeMillis(Long time, String format) {
        return new SimpleDateFormat(format).format(new Date(time));
    }

}
